﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CthulhuInvaders;
using CthulhuDomain;
using Moq;
using Moq.Proxy;
using Moq.Linq;
using Moq.Matchers;
using Moq.Properties;
using Moq.Protected;
using Moq.Language;
using NUnit.Framework;
using System.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Pex.Framework;


namespace CthulhuInvaders.Test
{
    // needed to debugging
    class NUnitConsoleRunner
    {
        [STAThread]
        static void Main(string[] args)
        {
            NUnit.ConsoleRunner.Runner.Main(args);
        }
    }

    [TestFixture]
    public partial class DomainFactoryFixture
    {
      #region unused
      //[Test]
      //public void InstaceOfCthulhuFactoryShouldBeNotNull()
      //{
      //    DomainFactory factory = DomainFactory.GetFactory(DomainFactory.eTypeEntity.Cthulhu);
      //    Assert.IsNotNull(factory,"factory should'n be NULL");
      //}

      //[Test]
      //public void InstaceOfPlayerFactoryShouldBeNotNull()
      //{
      //    DomainFactory factory = DomainFactory.GetFactory(DomainFactory.eTypeEntity.Player);
      //    Assert.IsNotNull(factory, "factory should'n be NULL");
      //} 

      //[Test]
      //public void InstanceOfCthulhuShouldBeNotNull()
      //{
      //  //DomainFactory factory = DomainFactory.GetFactory(DomainFactory.eTypeEntity.Cthulhu);
      //  //var mockC = new Mock<IContentManager>( MockBehavior.Loose);
      //  //IContentManager c = mockC.Object;
      //  //var mockT = new Mock<ITexture2D>(MockBehavior.Loose);
      //  //ITexture2D t = mockT.Object;
      //  //mockC.Setup<ITexture2D>(p => p.Load<ITexture2D>("cthulhu")).Returns(t);

      //  //DomainEntity entity = factory.CreateEntity(c);

      //  //Assert.IsNotNull(entity);
      //}

      #endregion

      [PexMethod]
      public void InstanceOfFactoryShouldBeNotNull(DomainFactory.eTypeEntity typeEntity)
      {
        DomainFactory factory = DomainFactory.GetFactory(typeEntity);
        Assert.IsNotNull(factory);
      }

    }
}
